package com.future.mayi.response;

import com.future.baselib.entity.BaseResponse;
import com.future.mayi.model.GoodsModel;
import com.google.gson.JsonSyntaxException;
import com.future.mayi.app.App;
import com.future.mayi.model.OldGoodsModel;

import org.json.JSONException;

public class GoodsResponse extends BaseResponse {
    private GoodsModel models;

    @Override
    public void parseInfo(String content) throws JSONException, JsonSyntaxException {
        models = App.getGson().fromJson(content, GoodsModel.class);
        if (models != null && models.getDetail() != null && models.getDetail().getRemainSecond() > 0) {
            models.getDetail().setThisTime(System.currentTimeMillis());
        }
    }


    public GoodsModel getModels() {
        return models;
    }
}
